package com.ws.admin.help.service.impl;

import com.ws.admin.help.entity.Help;
import com.ws.admin.help.mapper.HelpMapper;
import com.ws.admin.help.service.IHelpService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
import org.apache.ibatis.annotations.Param;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;

import java.util.HashMap;
import java.util.List;
import com.ws.common.utils.PageUtils;

/**
 * <p>
 * 求助信息表 服务实现类
 * </p>
 *
 * @author weifucheng
 * @since 2019-11-26
 */
@Service
public class HelpServiceImpl extends ServiceImpl<HelpMapper, Help> implements IHelpService {

    @Override
    public Page<Help> list(Help help, Integer current, Integer size) {
        Page<Help> page= PageUtils.newPage(current, size);
        page.setRecords(baseMapper.listByParam(page,help));
        return page;
    }

    @Override
    public Help readByMap(HashMap<String,Object> map) {
        return baseMapper.readByMap(map);
    }
}
